import { ORDER_GET, POST_STATE } from "../types";
import { handleActions } from "redux-actions";
import _ from "lodash"
const initData = {
    userId: "61a056228729d31230764bc9",
    genre: "全部订单",
    rows: [],
}
export const useOrder = handleActions({
    [ORDER_GET]: (state, { payload }) => {
        // console.log(payload);
        return _.assign({}, state, {
            rows:payload
        })

    },
    [POST_STATE]: (state, { payload }) => {
        const { ste } = payload;
        return _.assign({}, state, {
            genre: ste
        })
    },
}, initData)